import { TableColumnProps, Pagination, ASelectItemType } from '#/antd'
import { BaseTableState } from '#/core'
import { CommonUserInfo } from '@/api/userCenter/authority/model/accountModel'
import {
  AddOrganizationReq,
  EditOrganizationReq,
  OrganizationItem,
} from '@/api/userCenter/authority/model/organizationModel'

export type OrgTableState = BaseTableState<OrganizationItem>

export type AddOrgDialogForm = AddOrganizationReq

export interface EditOrgDialogForm extends Omit<EditOrganizationReq, 'id'> {
  memberIds: string[]
}
export interface AddOrgDialogState {
  visiable: boolean
  formData: AddOrgDialogForm
}
export interface EditOrgDialogState {
  visiable: boolean
  currentId: string
  allAccountList: ASelectItemType[]
  formData: EditOrgDialogForm
}

export interface MemberPreviewDialogState {
  visiable: boolean
  currentId: string
  tableData: CommonUserInfo[]
  tableColumn: TableColumnProps<CommonUserInfo>[]
  pageInfo: Pagination
}
